const path = require('path');

const {S_SERIES} = require('../../common/constans');

const readTempData = require('../conf/readTempData');

const {platform = S_SERIES,cwd}=readTempData();

let packDest = platform === 's' ? '/'+S_SERIES : '/'+platform;

const destoption = {
  syswebPath: packDest+"/ysdisk/www/webfile",
  pbxwebPath: packDest+"/ysdisk/www/webfile/apps/pbxweb",
  ldapwebPath: packDest+"/ysdisk/www/webfile/apps/ldapweb",
  autopwebPath: packDest+"/ysdisk/www/webfile/apps/autopweb",
  conferencewebPath: packDest+"/ysdisk/www/webfile/apps/conferenceweb",
  linkuswebPath: packDest+"/ysdisk/www/webfile/apps/linkusweb",
  vpnserverwebPath: packDest+"/ysdisk/www/webfile/apps/vpnsrvweb",
  mikoctiwebPath: packDest+"/ysdisk/www/webfile/apps/mikoctiweb",
  charhotelwebPath: packDest+"/ysdisk/www/webfile/apps/charhotelweb",
  billingwebPath: packDest+"/ysdisk/www/webfile/apps/billingweb",
  hotelwebPath: packDest+"/ysdisk/www/webfile/apps/hotelweb",
  smartvsipwebPath: packDest+"/ysdisk/www/webfile/apps/smartvsipweb",
  qmwebPath: packDest+"/ysdisk/www/webfile/apps/qmweb",
  zohowebPath: packDest+"/ysdisk/www/webfile/apps/zohoweb",
  swebdemoPath: packDest+"sweb_demo/webfile_gulp"
}

const srcoption = {
  syswebPath: "/s_series_src/ysdisk/www/webfile",
  syswebpcPath: "/s_series_src/ysdisk/www/webfile/apps/sysweb_pc",
  syswebcloudPath: "/s_series_src/ysdisk/www/webfile/apps/sysweb_cloud",
  pbxwebPath: "/s_series_src/ysdisk/www/webfile/apps/pbxweb",
  pbxwebpcPath: "/s_series_src/ysdisk/www/webfile/apps/pbxweb_pc",
  pbxwebcloudPath: "/s_series_src/ysdisk/www/webfile/apps/pbxweb_cloud",
  ldapwebPath: "/s_series_src/ysdisk/www/webfile/apps/ldapweb",
  ldapwebpcPath: "/s_series_src/ysdisk/www/webfile/apps/ldapweb_pc",
  ldapcloudwebPath: "/s_series_src/ysdisk/www/webfile/apps/ldapweb_cloud",
  autopwebPath: "/s_series_src/ysdisk/www/webfile/apps/autopweb",
  autopcloudwebPath: "/s_series_src/ysdisk/www/webfile/apps/autopweb_cloud",
  conferencewebPath: "/s_series_src/ysdisk/www/webfile/apps/conferenceweb",
  conferencecloudwebPath: "/s_series_src/ysdisk/www/webfile/apps/conferenceweb_cloud",
  linkuswebPath: "/s_series_src/ysdisk/www/webfile/apps/linkusweb",
  linkuspcwebPath: "/s_series_src/ysdisk/www/webfile/apps/linkusweb_pc",
  linkuscloudwebPath: "/s_series_src/ysdisk/www/webfile/apps/linkusweb_cloud",
  vpnserverwebPath: "/s_series_src/ysdisk/www/webfile/apps/vpnsrvweb",
  vpnserverpcwebPath: "/s_series_src/ysdisk/www/webfile/apps/vpnsrvweb_pc",
  vpnservercloudwebPath: "/s_series_src/ysdisk/www/webfile/apps/vpnsrvweb_cloud",
  mikoctiwebPath: "/s_series_src/ysdisk/www/webfile/apps/mikoctiweb",
  billingwebPath: "/s_series_src/ysdisk/www/webfile/apps/billingweb",
  charhotelwebPath: "/s_series_src/ysdisk/www/webfile/apps/charhotelweb",
  hotelwebPath: "/s_series_src/ysdisk/www/webfile/apps/hotelweb",
  hotelpcwebPath: "/s_series_src/ysdisk/www/webfile/apps/hotelweb_pc",
  smartvsipwebPath: "/s_series_src/ysdisk/www/webfile/apps/smartvsipweb",
  qmwebPath: "/s_series_src/ysdisk/www/webfile/apps/qmweb",
  zohowebPath: "/s_series_src/ysdisk/www/webfile/apps/zohoweb",
  zohowebcloudPath: "/s_series_src/ysdisk/www/webfile/apps/zohoweb_cloud",
  swebdemoPath: "sweb_demo/webfile"
};

function pathJoin(obj){
  Object.keys(obj).forEach(item=>{
    obj[item]=path.join(cwd,obj[item]);
  });
}
pathJoin(destoption);
pathJoin(srcoption);

console.log(destoption)
console.log(srcoption)
module.exports={destoption,srcoption}
